<template>
    <div>父组件中传递的数据： {{ props.num }}</div>
    子组件中修改父组件的数据：<input type="text" 
    @change="$emit('myEvent', son_number)" 
    v-model.lazy="son_number"/>
</template>
<script setup>
import { ref, defineProps, defineEmits } from 'vue'
const props = defineProps(['num'])
// 声明自定义事件
const emits = defineEmits(['myEvent'])
const son_number = ref(props.num)
</script>
<style scoped>
    
</style>